//
//  NSUserDefaultsSaveData.m
//  MISCloud
//
//  Created by goldeney on 13-8-13.
//  Copyright (c) 2013年 goldeneye. All rights reserved.
//

#import "NSUserDefaultsUserLogin.h"
#import "NSKeyedArchiverUserLogin.h"

@implementation NSUserDefaultsUserLogin

#pragma mark -- 用户登录信息
#pragma mark UserLoginInfo

/******是否保存用户登录密码*********/
+ (void) isSaveUserLoginPassWord:(BOOL)isSave
{
    NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
    [saveDefaults setBool:isSave forKey:@"UserLoginPassWord"];
    [saveDefaults synchronize];
}

/******获取是否保存用户登录密码*********/
+ (BOOL) getIsUserLoginPassWord
{
    NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
    BOOL isSave = [saveDefaults boolForKey:@"UserLoginPassWord"];
    return isSave;
}

#pragma mark -- 用户退出登录
#pragma mark UserExitLogin

/******删除用户登录信息*********/
+ (void) exitLoginDeleteSaveData
{
    [self isSaveUserLoginPassWord:FALSE];
    [NSKeyedArchiverUserLogin delectUserLoginData];
}

@end
